{#include file="aj/pageheader.html"#}
<script type="text/javascript" src="themes/aj/js/My97DatePicker/WdatePicker.js"></script>
<script>
       var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[id="content"]', {
					allowFileManager : true,
					pasteType : 2,
					newlineTag : this.value,
					// filterMode : true,
					urlType : 'domain'
				});
			});
</script>
<h1>
<span class="action-span1"><a href="#">添加文章</a> </span>
<span class="action-span"><a href="{#spUrl c=article a=index pid=$pid#}">文章列表</a></span>
</h1>
<div class="main-div">
<form method="post" action="{#spUrl c=article a=insert#}" name="theForm"  onsubmit="return validate()" enctype="multipart/form-data">
<table cellspacing="1" cellpadding="3" width="100%">

  <tr>
    <td class="label">文章标题</td>
    <td><input type="text" name="title" size = "60"/>&nbsp;<font color="#FF0000">*</font></td>
  </tr>


<!--  <tr>
    <td class="label">显示:</td>
    <td>
      <input type="radio" name="is_open" value="1" checked="checked"/>显示&nbsp;&nbsp;
      <input type="radio" name="is_open" value="0"/>隐藏
    </td>
  </tr>-->
 {#if $smarty.get.pid neq 61#}
    <tr>
    <td class="label">上传文件和图片<font color="#FF0000"></font></td>
    <td>
      <input type="file" name="upfile"/>
    </td>
  </tr>
{#/if#} 

{#if $smarty.get.pid==62 or $smarty.get.pid==61 or $smarty.get.pid==5 or $smarty.get.pid==84 or $smarty.get.pid==92 or $smarty.get.pid==94 or $smarty.get.pid==8 or $smarty.get.pid==73 or $smarty.get.pid==74 or $smarty.get.pid==70 or $smarty.get.pid==71 or $smarty.get.pid==77 or $smarty.get.pid==80#}
  <tr>
        <td class="label">摘要</td>
        <td><textarea name="short" cols="100" rows="8" style="width:300px;height:50px;">{#$detail.short#}</textarea></td>
  </tr>
  {#/if#}  
  
  
  <tr>
    <td class="label">日期<font color="#FF0000">(可选，不填为当前时间)</font></td>
    <td>
      <input id="d11" name="adddate" type="text" value="{#$detail.add_time|date_format:'%Y-%m-%d'#}" onClick="WdatePicker()"/>
    </td>
  </tr>

  <tr>
        <td class="label">文章内容</td>
        <td><textarea id="content" name="content" cols="100" rows="8" style="width:700px;height:300px;"></textarea></td>
  </tr>
 <tr>
    <td class="label">关键字</td>
    <td><input type="text" name="keywords" maxlength="60" size="50"/><br/><span><font color="#999999">关键字为选填项，其目的在于方便外部搜索引擎搜索</font></span>
    </td>
  </tr>
  <tr>
    <td class="label">描述</td>
    <td><textarea  name="description" cols="60" rows="4"></textarea></td>
  </tr>

  <tr>
    <td colspan="2" align="center"><br />
	  <input type="hidden" name="pid" value="{#$smarty.get.pid#}" />
      <input type="submit" class="button" value="提交" />
      <input type="reset" class="button" value="重置" />
    </td>
  </tr>
</table>
</form>
</div>
{#include file="aj/pagefooter.html"#}